import request from '@/utils/request'
// 查询企业的部门列表
export function addDepartments() {
  return request({
    url: '/company/department',
   
  })
}

// 新增部门
export function newDepartments(data) {
  return request({
    url: '/company/department',
   method:'post',
   data
  })
}
// 根据id查询部门
export function idDepartments(id) {
  return request({
    url: `/company/department/${id}`,
   method:'get',
   
  })
}
// 根据id编辑部门
export function aditDepartments(data) {
  return request({
    url: `/company/department/${data.id}`,
   method:'put',
   data
  })
}

// 根据id删除部门
export function deleDepartments(id) {
  return request({
    url: `/company/department/${id}`,
   method:'delete',
   
  })
}